/**
 * Created by zhu on 2016/2/5.
 */
$(function(){
    $.get(contextPath+"/mmt_admin/seller",function(data){
        initSeller(data);
    });

});

function initSeller(data){
    data = $.parseJSON(data);

    var content = $('#seller');
    content.empty();
    $.each(data.list,function(i,item){
        var temp = ' <div class="col-md-3" align="center"><img src="'+contextPath+"/resources/css/img/dogs.jpg"+'" style="height: 140px;width: 140px" class="img-thumbnail">' +
            '<p align="center" style="width: 100px;padding-bottom:30px;margin-top: 10px;font-size: 18px;"><a href="#"  onclick="mydetail('+item.id +')">'+item.shopName+'</a></p></div>';
        content.append(temp);
    })
}

function mydetail(id){
    window.location.href=contextPath+"/back_stage_anagement/mmt_admin/admin_seller/detail/"+id;
}